Fixed get_size() for GtkCellRendererText to clip to the input area
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Wed, 5 Jan 2011 17:29:18 +0000 (02:29 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Wed, 5 Jan 2011 17:31:42 +0000 (02:31 +0900)
commit9a80100e9ab2430ecc4375ba6bd2f66784ce34a9
tree710b6b54d92e905bfc838c64fdfc05c1eb0ead68
parente41fb7703ca810db1f391dc3237f0465a93f9140
Fixed get_size() for GtkCellRendererText to clip to the input area

For ellipsize cells it's important to clip the result of get_size()
so that the returned required rectangle is indeed less than or equal
to the input rectangle... this is done so that GtkCellArea can accurately
paint focus on cells by calling gtk_cell_renderer_get_aligned_area().

Patch also adds assertions to gtk_cell_renderer_get_aligned_area() to
ensure this keeps working correctly.
gtk/gtkcellrenderer.c
gtk/gtkcellrenderertext.c